﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DataInfo;
using XBLib.Dal;
using XBLib.Dal.AdoDal;
using XBLib.BusinessObject;
using System.Data.Common;
using KenLib.BusinessObject;

namespace KenLib.Dal
{
    public class 応募学歴情報Dao : BaseAdoDao
    {
        #region Thanh Dong
        public DataTable sp_frmJ_TraineeAcademicInput_SelectByID_Dong(int id)
        {
            DbParameter dbparamter1 = _daoHelper.CreateParameter("@id", id, DbType.Int32);
            DbCommand dbcomman = _daoHelper.CreateCommand(CommandNameManager.sp_frmJ_TraineeAcademicInput_SelectByID_Dong, CommandType.StoredProcedure, dbparamter1);
            return _daoHelper.Query(dbcomman);
        }

        public int frmJ_TraineeAcademicInput_Insert(応募学歴情報 _応募学歴情報)
        { 
            DbParameter dbparamer1 = _daoHelper.CreateParameter("@学歴区分",_応募学歴情報.学歴区分,DbType.String);
            DbParameter dbparamer2 = _daoHelper.CreateParameter("@開始時期",_応募学歴情報.開始時期,DbType.DateTime);
            DbParameter dbparamer3 = _daoHelper.CreateParameter("@終了時期",_応募学歴情報.終了時期,DbType.DateTime);
            DbParameter dbparamer4 = _daoHelper.CreateParameter("@学校名",_応募学歴情報.学校名,DbType.String);
            DbParameter dbparamer5 = _daoHelper.CreateParameter("@学校住所",_応募学歴情報.学校住所,DbType.String);
            DbParameter dbparamer6 = _daoHelper.CreateParameter("@専攻区分",_応募学歴情報.専攻区分,DbType.Int32);
            DbParameter dbparamer7 = _daoHelper.CreateParameter("@全日夜間",_応募学歴情報.全日夜間,DbType.Int32);
            DbParameter dbparamer8 = _daoHelper.CreateParameter("@専攻系列コード",_応募学歴情報.専攻系列コード,DbType.String);
            DbParameter dbparamer9 = _daoHelper.CreateParameter("@専攻学部",_応募学歴情報.専攻学部,DbType.String);
            DbParameter dbparamer10 = _daoHelper.CreateParameter("@専攻学科",_応募学歴情報.専攻学科,DbType.String);
            DbParameter dbparamer11 = _daoHelper.CreateParameter("@専攻内容",_応募学歴情報.専攻内容,DbType.String);
            DbParameter dbparamer12 = _daoHelper.CreateParameter("@専門技術",_応募学歴情報.専門技術,DbType.String);
            DbParameter dbparamer13 = _daoHelper.CreateParameter("@応募情報ID",_応募学歴情報.応募情報ID,DbType.Int32);
            DbParameter dbparamer14 = _daoHelper.CreateParameter("@廃止区分", _応募学歴情報.廃止区分, DbType.Int32);
            DbCommand dbcomman = _daoHelper.CreateCommand(CommandNameManager.sp_frmJ_TraineeAcademicInput_Insert_Dong, CommandType.StoredProcedure, dbparamer1, dbparamer2, dbparamer3, dbparamer4, dbparamer5, dbparamer6, dbparamer7, dbparamer8, dbparamer9, dbparamer10, dbparamer11, dbparamer12, dbparamer13, dbparamer14);
            return _daoHelper.Execute(dbcomman);
        }


        public int frmJ_TraineeAcademicInput_Update(応募学歴情報 _応募学歴情報)
        {
            DbParameter dbparamer0 = _daoHelper.CreateParameter("@ID", _応募学歴情報.ID, DbType.Int32);
            DbParameter dbparamer1 = _daoHelper.CreateParameter("@学歴区分", _応募学歴情報.学歴区分, DbType.String);
            DbParameter dbparamer2 = _daoHelper.CreateParameter("@開始時期", _応募学歴情報.開始時期, DbType.DateTime);
            DbParameter dbparamer3 = _daoHelper.CreateParameter("@終了時期", _応募学歴情報.終了時期, DbType.DateTime);
            DbParameter dbparamer4 = _daoHelper.CreateParameter("@学校名", _応募学歴情報.学校名, DbType.String);
            DbParameter dbparamer5 = _daoHelper.CreateParameter("@学校住所", _応募学歴情報.学校住所, DbType.String);
            DbParameter dbparamer6 = _daoHelper.CreateParameter("@専攻区分", _応募学歴情報.専攻区分, DbType.Int32);
            DbParameter dbparamer7 = _daoHelper.CreateParameter("@全日夜間", _応募学歴情報.全日夜間, DbType.Int32);
            DbParameter dbparamer8 = _daoHelper.CreateParameter("@専攻系列コード", _応募学歴情報.専攻系列コード, DbType.String);
            DbParameter dbparamer9 = _daoHelper.CreateParameter("@専攻学部", _応募学歴情報.専攻学部, DbType.String);
            DbParameter dbparamer10 = _daoHelper.CreateParameter("@専攻学科", _応募学歴情報.専攻学科, DbType.String);
            DbParameter dbparamer11 = _daoHelper.CreateParameter("@専攻内容", _応募学歴情報.専攻内容, DbType.String);
            DbParameter dbparamer12 = _daoHelper.CreateParameter("@専門技術", _応募学歴情報.専門技術, DbType.String);
            DbParameter dbparamer13 = _daoHelper.CreateParameter("@応募情報ID", _応募学歴情報.応募情報ID, DbType.Int32);

            DbCommand dbcomman = _daoHelper.CreateCommand(CommandNameManager.sp_frmJ_TraineeAcademicInput_Update_Dong, CommandType.StoredProcedure, dbparamer0, dbparamer1, dbparamer2, dbparamer3, dbparamer4, dbparamer5, dbparamer6, dbparamer7, dbparamer8, dbparamer9, dbparamer10, dbparamer11, dbparamer12, dbparamer13);
            return _daoHelper.Execute(dbcomman);
        }



        #endregion

        #region Vh
        public DataTable frmJ_TraineeInterviewList_Search(string date, string time, int 企業ID)
        {
            DbCommand com = _daoHelper.CreateCommand("sp_frmJ_TraineeInterviewList_Search_Dong", CommandType.StoredProcedure);
            DbParameter para1 = _daoHelper.CreateParameter("@面接日", date);
            DbParameter para2 = _daoHelper.CreateParameter("@面接時期", time);
            DbParameter para3 = _daoHelper.CreateParameter("@企業ID", 企業ID);
            com.Parameters.Add(para1);
            com.Parameters.Add(para2);
            com.Parameters.Add(para3);
            return _daoHelper.Query(com);
        }

        public DataTable getTimeTraineeInterviewList()
        {
            DbCommand command = _daoHelper.CreateCommand("getTimeTraineeInterviewListJS10_Vh", CommandType.StoredProcedure);
            DataTable dt = _daoHelper.Query(command);
            return dt;
        }

        public DataTable select_Hours_With_Date_JS10_Vh(string date)
        {
            DbCommand com = _daoHelper.CreateCommand("select_Hours_With_Date_JS10_Vh", CommandType.StoredProcedure);
            DbParameter para1 = _daoHelper.CreateParameter("@来社日", date);
            
            com.Parameters.Add(para1);
            
            return _daoHelper.Query(com);
        }

        #endregion
        #region Phuong
        public DataTable sp_frmJ_TraineeResumeOutput_Search_SubReport1_Phuong(int 応募情報ID)
        {
            DbParameter dbparamter1 = _daoHelper.CreateParameter("@応募情報ID", 応募情報ID, DbType.Int32);
            DbCommand dbcomman = _daoHelper.CreateCommand(CommandNameManager.sp_frmJ_TraineeResumeOutput_Search_SubReport1_Phuong, CommandType.StoredProcedure, dbparamter1);
            return _daoHelper.Query(dbcomman);
        }
        public DataTable selectAll応募学歴情報_luclt()
        {
            DbCommand dbcommand = _daoHelper.CreateCommand("selectAll応募学歴情報_luclt", CommandType.StoredProcedure);
            return _daoHelper.Query(dbcommand);
        }
        #endregion


 
    }
}
